package com.kjlink.internal.report4vue.base.model;

import cn.xuqiudong.common.base.model.BaseResponse;

import java.io.Serializable;

/**
 * 描述:
 * 给vue前端提供的统一响应
 *
 * @author Vic.xu
 * @since 2024-11-22 17:35
 */

public class ApiBaseResponse<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private int code;
    private String message;
    private T data;

    public ApiBaseResponse() {
    }

    public ApiBaseResponse(BaseResponse<T> baseResponse) {
        this.code = baseResponse.getCode();
        this.message = baseResponse.getMsg();
        this.data = baseResponse.getData();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
